Skip to main content
PUT
/
api
/
v1
/
checkout
/
sessions
/
{id}
Update a checkout session [V1]
curl --request PUT \
  --url https://api.loops.fi/api/v1/checkout/sessions/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 1.01,
  "currency": "<string>",
  "productName": "<string>",
  "productDescription": "<string>",
  "successUrl": "<string>",
  "cancelUrl": "<string>",
  "externalCustomerId": "<string>",
  "customerId": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "metadata": {}
}'
{
  "id": "<string>",
  "url": "<string>",
  "status": "PENDING",
  "amount": 123,
  "currency": "<string>",
  "productName": "<string>",
  "externalCustomerId": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "completedAt": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "metadata": {}
}

Authorizations

Authorization
string
header
required

API Key authentication using Bearer token

Path Parameters

id
string
required

Checkout session ID

Body

application/json
amount
number

Amount to charge

Required range: x >= 0.01
currency
string

Currency code

productName
string

Product name

Maximum length: 200
productDescription
string

Product description

Maximum length: 1000
successUrl
string<uri>

URL to redirect after successful payment

cancelUrl
string<uri>

URL to redirect after cancelled payment

externalCustomerId
string

External customer identifier

customerId
string

Internal customer identifier

expiresAt
string<date-time>

Session expiration time

metadata
object

Additional metadata

Response

Default Response

id
string
required

Unique session identifier

url
string<uri>
required

URL to redirect customer to complete checkout

status
enum<string>
required

Session status

Available options:
PENDING,
COMPLETED,
EXPIRED,
CANCELLED
amount
number
required

Amount to be charged

currency
string
required

Currency code (e.g., USD)

productName
string
required

Name of the product

createdAt
string<date-time>
required

Session creation time

externalCustomerId
string

External customer identifier

expiresAt
string<date-time>

Session expiration time

completedAt
string<date-time>

Session completion time

metadata
object

Additional metadata

I